package com.example.springboot.web.controller;

import com.example.springboot.web.common.R;
import com.example.springboot.web.controller.vo.WxMenuReqVO;
import com.example.springboot.web.controller.vo.WxMenuResVO;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <a href="http://localhost:8080/doc.html">...</a>
 * @author lei yu
 * @date 2024/05/20
 */
@Tag(name = "微信菜单")
@Slf4j
@RestController
@RequestMapping("menu")
public class DemoController {

    @Operation(summary = "保存公众号菜单")
    @PostMapping("save")
    public R<WxMenuResVO> saveMenu(@Valid @RequestBody WxMenuReqVO reqVO){
        log.info("保存公众号菜单：{}", reqVO);
        WxMenuResVO res = new WxMenuResVO().setMenuId("1");
        return R.ok(res);
    }
}
